package com;

import com.xunhuan;
public class jiandaoshitoubu {
    public static void main(String[] args) {
        int myScore = 0;
        int enemyScore =0;

        System.out.println("*******欢迎来到世界级人机对战平台****");
        System.out.println("请问是否开始对战（Y/N）：");
        System isStart = sc.next;
        if (isStart.equals("Y")){
            System.out.println("对战开始");

            for (int i = 1;i <= 5;i++){
                System.out.println("第" + i + "局游戏开始：");
                System.out.println("请你出招：1.石头 2.剪刀 3.布");
                int choice = sc.nextInt();
                int enemyChoice = (int)(Math.random()*3) + 1;
                System.out.println("我的出拳是：" + change(choice));
                System.out.println("人机的出拳是" + change(enemyChoice));
                if ((choice == 1 && enemyChoice ==2)||(choice == 2 && enemyChoice ==3)||(choice == 3 && enemyChoice ==1)){
                    System.out.println("世界级胜利！");
                    myScore++;
                }else if ((choice == 1 && enemyChoice ==1)||(choice == 2 && enemyChoice ==2)||(choice == 3 && enemyChoice ==3)){
                    System.out.println("世界级平局！");
                }else{
                    System.out.println("失败了！！回家种地吧！！");
                    enemyScore++;
                }
            }
            if (myScore > enemyScore){
                System.out.println("最终是我战胜了人机！すごい");
            }else if (myScore = enemyScore){
                System.out.println("是平局！あまりよくない");
            }else(myScore < enemyScore) {
                    System.out.println("你输给了人机！惜しい");}
        }

        else {
            System.out.println("对战结束");
    }
    }

}
